<?php
/**
 * Created by PhpStorm.
 * User: zhenl
 * Date: 2022/9/30
 * Time: 11:43
 */
namespace common\models;


use think\Model;
use think\model\concern\SoftDelete;

class OrderModel extends Model
{
    use SoftDelete;

    protected $table = 'orders';

    protected $pk = 'order_id';

    public $autoWriteTimestamp = 'datetime';


    public function detail()
    {
        return $this->hasMany(OrderDetailModel::class, 'order_id', 'order_id');
    }
}